/*
 * Copyright (c) Jiandong.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */

import hilog from '@ohos.hilog';
import worker from '@ohos.worker';


const Run_BUNDLE: number = 0
const RUN_APPLICATION: number = 1


hilog.error(0x0000, "worker", '%{public}s', "js queue thread");

const parentPort = worker.workerPort;
parentPort.onmessage = function(e){
    parentPort.postMessage("ReactThread: js queue receive data from main.js")
    hilog.info(0x0000, 'worker', 'Test NAPI 2 + 3 = %{public}d', 11)

    switch (e.data.message) {
         case Run_BUNDLE:
            break;
         case RUN_APPLICATION:
            break;
         default:
            break;
    }

}